let d0 = data,
  utils = d0.utils,
  STUtil = d0.STUtil,
  Node = d0.Node,
  SplayTree = d0.SplayTree,
  isInBbox = d0.isInBbox,
  getBboxOverlap = d0.getBboxOverlap,
  cmp = d0.cmp,
  rounder = d0.rounder,
  geomIn = d0.geomIn,
  geomOut = d0.geomOut,
  operation = d0.operation,
  Segment = d0.Segment,
  SweepEvent = d0.SweepEvent,
  SweepLine = d0.SweepLine;
console.log("14PolygonClipping_sweep-line01");

utils.extend(SweepLine.prototype, { process: function (event) { const segment = event.segment, newEvents = []; if (event.consumedBy) return event.isLeft ? this.queue.remove(event.otherSE) : this.tree.remove(segment), newEvents; const node = event.isLeft ? this.tree.insert(segment) : this.tree.find(segment); if (!node) throw new Error("SweepLine"); let prevNode = node, nextNode = node, prevSeg = void 0, nextSeg = void 0; for (; void 0 === prevSeg;)prevNode = this.tree.prev(prevNode), null === prevNode ? prevSeg = null : void 0 === prevNode.key.consumedBy && (prevSeg = prevNode.key); for (; void 0 === nextSeg;)nextNode = this.tree.next(nextNode), null === nextNode ? nextSeg = null : void 0 === nextNode.key.consumedBy && (nextSeg = nextNode.key); if (event.isLeft) { let prevMySplitter = null; if (prevSeg) { const prevInter = prevSeg.getIntersection(segment); if (null !== prevInter && (segment.isAnEndpoint(prevInter) || (prevMySplitter = prevInter), !prevSeg.isAnEndpoint(prevInter))) { const newEventsFromSplit = this._splitSafely(prevSeg, prevInter); for (let i = 0, iMax = newEventsFromSplit.length; i < iMax; i++)newEvents.push(newEventsFromSplit[i]) } } let nextMySplitter = null; if (nextSeg) { const nextInter = nextSeg.getIntersection(segment); if (null !== nextInter && (segment.isAnEndpoint(nextInter) || (nextMySplitter = nextInter), !nextSeg.isAnEndpoint(nextInter))) { const newEventsFromSplit = this._splitSafely(nextSeg, nextInter); for (let i = 0, iMax = newEventsFromSplit.length; i < iMax; i++)newEvents.push(newEventsFromSplit[i]) } } if (null !== prevMySplitter || null !== nextMySplitter) { let mySplitter = null; if (null === prevMySplitter) mySplitter = nextMySplitter; else if (null === nextMySplitter) mySplitter = prevMySplitter; else { const cmpSplitters = SweepEvent.comparePoints(prevMySplitter, nextMySplitter); mySplitter = cmpSplitters <= 0 ? prevMySplitter : nextMySplitter } this.queue.remove(segment.rightSE), newEvents.push(segment.rightSE); const newEventsFromSplit = segment.split(mySplitter); for (let i = 0, iMax = newEventsFromSplit.length; i < iMax; i++)newEvents.push(newEventsFromSplit[i]) } newEvents.length > 0 ? (this.tree.remove(segment), newEvents.push(event)) : (this.segments.push(segment), segment.prev = prevSeg) } else { if (prevSeg && nextSeg) { const inter = prevSeg.getIntersection(nextSeg); if (null !== inter) { if (!prevSeg.isAnEndpoint(inter)) { const newEventsFromSplit = this._splitSafely(prevSeg, inter); for (let i = 0, iMax = newEventsFromSplit.length; i < iMax; i++)newEvents.push(newEventsFromSplit[i]) } if (!nextSeg.isAnEndpoint(inter)) { const newEventsFromSplit = this._splitSafely(nextSeg, inter); for (let i = 0, iMax = newEventsFromSplit.length; i < iMax; i++)newEvents.push(newEventsFromSplit[i]) } } } this.tree.remove(segment) } return newEvents } });
var resu = {
  utils: utils,
  STUtil: STUtil,
  Node: Node,
  SplayTree: SplayTree,
  isInBbox: isInBbox,
  getBboxOverlap: getBboxOverlap,
  cmp: cmp,
  rounder: rounder,
  geomIn: geomIn,
  geomOut: geomOut,
  operation: operation,
  Segment: Segment,
  SweepEvent: SweepEvent,
  SweepLine: SweepLine
};
return resu;